<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "rah_sms".
 *
 * @property integer $smsID
 * @property string $smsType
 * @property string $phones
 * @property string $body
 * @property string $createTime
 * @property string $createUser
 * @property string $responseCode
 * @property string $smsCode
 */
class Sms extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'rah_sms';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['createTime'], 'safe'],
            [['smsType', 'phones', 'createUser'], 'string', 'max' => 50],
            [['body'], 'string', 'max' => 500],
            [['responseCode'], 'string', 'max' => 20],
            [['smsCode'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'smsID' => Yii::t('frontend___xxx', 'Sms ID'),
            'smsType' => Yii::t('frontend___xxx', 'Sms Type'),
            'phones' => Yii::t('frontend___xxx', 'Phones'),
            'body' => Yii::t('frontend___xxx', 'Body'),
            'createTime' => Yii::t('frontend___xxx', 'Create Time'),
            'createUser' => Yii::t('frontend___xxx', 'Create User'),
            'responseCode' => Yii::t('frontend___xxx', 'Response Code'),
            'smsCode' => Yii::t('frontend___xxx', 'Sms Code'),
        ];
    }

    /**
     * @inheritdoc
     * @return \common\models\query\SmsQuery the active query used by this AR class.
     */
    public static function find()
    {
        return new \common\models\query\SmsQuery(get_called_class());
    }
}
